<template>
  <footer class="aiseo-home-footer">
    <div class="footer-inner">
      <div class="footer-main">
        <div class="footer-info-list">
          <div class="list-content" v-for="list in infoArr" :key="list.name">
            <div class="list-title">{{ list.name }}</div>
            <div
              class="list-infoarr"
              v-for="item in list.infoList"
              :key="item"
              @click="handleCopy2(item)"
              :class="{'click-class': item.isClick}"
            >
              {{ item.name }}
            </div>
          </div>
        </div>
        <div class="footer-contact">
          <div class="footer-top" @click="handleClickTo">
            <img
              src="@/assets/image/SVG/AISEO_LOGO.svg"
              alt=""
              style="height: 50px"
            />
          </div>
          <div class="contact-name">联系我们</div>
          <ul class="footer-list">
            <li>
              <img
                src="@/assets/image/footer/foot1.png"
                alt=""
                style="width: 80px; height: 80px"
              />
              <div style="margin-top: 4px; color: #808080; font-size: 14px">
                腾讯QQ
              </div>
            </li>
            <li>
              <img
                src="@/assets/image/footer/foot2.png"
                alt=""
                style="width: 80px; height: 80px"
              />
              <div style="margin-top: 4px; color: #808080; font-size: 14px">
                微信
              </div>
            </li>
            <li>
              <img
                src="@/assets/image/footer/foot3.png"
                alt=""
                style="width: 80px; height: 80px"
              />
              <div style="margin-top: 4px; color: #808080; font-size: 14px">
                Whats APP
              </div>
            </li>
          </ul>
        </div>
      </div>
      <div class="footer-text pl-40">
        <span>Copyright © 2024. 柳暗星河科技有限公司版权所有</span>
        <span class="ml-8">|</span>
        <span class="ml-8 click-class" @click="handleOpenICPlink">蜀ICP备2024075814号-2</span>
      </div>
    </div>
  </footer>
</template>

<script setup>
import { ref } from "vue";
import EventBus from "@/utils/eventBus.js";
import { useRoute, useRouter } from "vue-router";

const router = useRouter();
const infoArr = [
  {
    name: "产品及服务",
    // infoList: ["文字撰写", "SEO定制", "软文推广", "网站优化", "网站联运"],
    infoList:[
              {
              name: "文字撰写",
              router: "/writingtext",
              isClick: true
            },
            {
              name: "SEO定制",
              router: "/seoCustomer",
              isClick: true
            },
            {
              name: "软文推广",
              router: "/softArticlePromotion",
              isClick: true
            },
            {
              name: "网站优化",
              router: "/websiteOptimization",
              isClick: true

            },
            {
              name: "网站联运",
              router: "/websiteIntermodalTransportation",
              isClick: true

            }
    ]
  },
  {
    name: "合作网站",
    // infoList: ["柳暗星河官网", "itmop", "听力课堂", "律霸", "369游戏"],
    infoList:[
              {
              name: "柳暗星河官网",
            },
            {
              name: "itmop",
            },
            {
              name: "听力课堂",
            },
            {
              name: "律霸",

            },
            {
              name: "369游戏",
            }
    ]
  },
  {
    name: "关于我们",
    // infoList: ["公司简介", "商务合作", "投诉建议", "售前电话：028-65221233"],
    infoList:[
              {
              name: "公司简介",
            },
            {
              name: "商务合作",
            },
            {
              name: "投诉建议：1020122233@qq.com",
              isClick: true,
              iscopy: true,
              copoytext: "1020122233@qq.com"
            },
            {
              name: "售前电话：028-65221233",
              isClick: true,
              iscopy: true,
              copoytext: "028-65221233"
            }
    ]
  },
];
const handleClickTo = () => {
  router.push("/");
  EventBus.emit("clicktoTop");
};
const handleCopy2 = (item) => {
  if (item.iscopy) {
    EventBus.emit('openToastBox', ["已复制到剪切板！", item.copoytext])
  }else if(item.router){
    router.push(item.router);
  }
};
const handleOpenICPlink = () => {
  window.open('https://beian.miit.gov.cn/')
}
</script>

<style lang="scss" scoped>
$footerColor: #808080;
.aiseo-home-footer {
  width: 100%;
  height: 419px;
  background-color: #f0f0f0;
  padding: 40px 0;
  box-sizing: border-box;
  font-family: Alibaba PuHuiTi-Regular;
  font-weight: 400;
  .click-class{
      cursor: pointer;
    }
  .footer-inner {
    width: $aiseoHomeWidth;
    margin: 0 auto;
  }
  .footer-main {
    width: 100%;
    display: flex;
    justify-content: space-between;
    overflow: hidden;
    align-items: center;
    .footer-info-list {
      display: flex;
      flex: 1;
      .list-content {
        letter-spacing: 1px;
        box-sizing: border-box;
        padding: 40px 40px 0 40px;
        & + .list-content {
          margin-left: 40px;
        }
        .list-title {
          font-weight: 500;
          font-size: 18px;
          color: #4d4d4d;
          margin-bottom: 16px;
          font-family: Alibaba PuHuiTi-Medium;
        }
        .list-infoarr {
          font-weight: 400;
          font-size: 16px;
          color: $footerColor;
          font-family: Alibaba PuHuiTi-Regular;
          & + .list-infoarr {
            margin-top: 12px;
          }
        }
      }
    }
    .footer-contact {
      display: flex;
      flex-direction: column;
      box-sizing: border-box;
      .footer-top {
        width: 223px;
        height: 60px;
        cursor: pointer;
      }
      .contact-name {
        font-size: 18px;
        font-weight: 600;
        color: #4d4d4d;
      }
      .footer-list {
        margin-top: 16px;
        width: 312px;
        display: flex;
        justify-content: space-between;
        li {
          height: 100px;
          display: flex;
          flex-direction: column;
          justify-content: center;
          align-items: center;
          text-align: center;
          border-radius: 12px;
          & + li {
            margin-left: 36px;
          }
        }
      }
    }
  }
  .footer-text {
    font-size: 14px;
    font-family: Alibaba PuHuiTi-Regular;
    font-weight: 400;
    color: #808080;
    margin-top: 78px;
    .footer-text-right {
      &::before {
        content: "";
        width: 1px;
        height: 8px;
        background-color: $footerColor;
        display: inline-block;
        margin: 0 12px;
      }
    }
  }
}
</style>
